home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-15 | 3.9 KB | 76 lines | [TEXT/GEOL] |
- Apple II
- File Type Notes
- _____________________________________________________________________________
- Developer Technical Support
-
- File Type: $B7 (183)
- Auxiliary Type: All
-
- Full Name: ProDOS 16 or GS/OS Temporary Initialization File
- Short Name: Temporary initialization file
-
- Modified by: Matt Deatherage May 1992
- Written by: Matt Deatherage September 1990
-
- Files of this type contain initialization code that is unloaded immediately
- after executing.
-
- CHANGES SINCE SEPTEMBER 1990: Added new information pertaining to System
- Software 6.0 and answered some commonly asked questions.
- _____________________________________________________________________________
-
- Files of type $B7 contain temporary initialization code. Such files are often
- referred to as "inits". They are loaded by GS/OS at boot time and are
- unloaded immediately after execution. The auxiliary type is RESERVED except
- for bit 15--if bit 15 is set, the initialization file is not loaded.
-
- The structure of an init is similar to that of an application. The first byte
- of the loaded code image (inits are load files) is the entry point, and the
- init must end with an RTL instruction. When GS/OS transfers control to a
- temporary initialization file, the processor is in 16-bit native mode. The A
- register contains the init's user ID, D points to the bottom of a 4K stack and
- direct-page area and S points to near the top of that area. (If the init has
- an OMF stack and direct page segment linked in, the D and S registers point to
- it instead.) The data bank register is not defined; you should save it, set
- it and restore it if you use absolute addressing.
-
- All inits are loaded and executed entirely after the System Software is
- initialized; all of GS/OS is present and all of the tools are startable
- (although that's not necessarily advised; see later in this Note). The
- contents of all prefixes are undefined, and you should save and restore any
- prefixes you use. An init that wants to find its own pathname can use the
- System Loader call LGetPathname2. The commonly-seen icons at the bottom of
- the graphics screen are only available to CDevs in System Software 5.0 through
- 5.0.4, unless you draw the icon yourself, but under 6.0 and later the
- Miscellaneous Tools call ShowBootInfo will display an icon on the graphics
- screen or a version line on the text screen like GS/OS components.
-
- While all tools are available to be started, that doesn't mean tools should
- necessarily be started. Inits can be loaded after boot time (such as with IR
- 2.0, DTS Sample Code for an Apple IIgs Finder Extension), and blindly
- attempting to start and shut down tools without first checking their status
- can be disastrous in such instances. In particular, inits should never call
- TLStartUp or TLShutDown, and should check for the presence of other tools
- through each tool's status function before starting it up.
-
- Inits that need to tell the difference between boot time and later loading
- times (for example, a RAM disk restoration init) can check the result of the
- GS/OS call GetName--if there is no name, the system's currently being started
- up.
-
- Temporary initialization files are shut down by GS/OS after they perform their
- RTL, so they are a good choice for transient purposes. Temporary inits are
- good for playing sounds during the boot process, loading pictures, and other
- instances where data is passed to other system routines. For example, a
- temporary init might read files from a disk and save them to a RAM disk. The
- init gets to set up the RAM disk, but after that's done it doesn't need to
- stick around and take up memory--and since it's a temporary init, GS/OS
- unloads it after its work is done.
-
-
- Further Reference
- _____________________________________________________________________________
-
- o GS/OS Reference
- o File Type Note for File Type $B6, Permanent Initialization Files
-